from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from tastypie.api import Api
from app.api import UserResource, VectorResource, OtherResource
from eVB1 import settings

admin.autodiscover()

project_api = Api(api_name='v1')
project_api.register(UserResource())
project_api.register(VectorResource())

project_api.register(OtherResource())




urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'eVB1.views.home', name='home'),
    # url(r'^eVB1/', include('eVB1.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),

    url(r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'login.html'}),
    url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/login/'}, name='logout'),

    url(r'^api/', include(project_api.urls)),

    url(r'^$', 'app.views.index', name='site_index'),
)
